package com.struts.web.user.register;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;

import com.base.Constants;
import com.ibatis.po.user.TUser;
import com.lg.system.CLGAction;
import com.struts.deal.user.register.Deal;
import com.struts.web.user.register.BaseInfoForm;

public class BaseInfoAction extends CLGAction {
     
	/**
	 *  ��ȡҳ����Ϣ
	 */
	public ActionForward execute(ActionMapping actionMapping,
            ActionForm actionForm,
            HttpServletRequest request,
            HttpServletResponse response) throws
Exception {
		BaseInfoForm aWebForm = (BaseInfoForm)actionForm;
		if(aWebForm.getMethod()!=null && aWebForm.getMethod().equals("add")){
			aWebForm.setMethod("");
			boolean result = false;
			result=Deal.doBaseInfo(request, aWebForm);
			if(result==true){
				return actionMapping.findForward("regEducation");
			}else{
				return actionMapping.findForward("sorryreg");
			}
		   
		
		}
		else{
			Deal.setDefault(request,response,aWebForm);
			return actionMapping.getInputForward();
		}
		

}
}
